<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<center>
    <h1 style="color: red">登录失败</h1>
    <form id="form" action="http://localhost:8080/onlineSystem/logPage" method="post">
        <table>
            <tr>
                <td>用户名</td>
                <td><input type="text" name="username" id="username"/></td>
            </tr>
            <tr>
                <td>密码</td>
                <td><input type="password" name="userpwd" id="userpwd"/></td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="button" id="btn" value="登录">
                <td>
            </tr>
        </table>
    </form>
</center>
<script type="text/javascript">
    window.onload = function () {
        var form = document.getElementById("form")
        var username = document.getElementById("username");
        var userpwd = document.getElementById("userpwd");
        var btn = document.getElementById("btn");

        btn.onclick = function () {
            if(userpwd.value != "" && username.value != ""){
                form.submit();
            }
        }
    }
</script>
</body>
</html>